#include <iostream>
//
// Created by Asus on 2025/4/21.
//
class Point {
private:
    int x;
    int y;

public:
    Point(int _x, int _y) : x(_x), y(_y) {
    }

    bool isSameAs(const Point &other) const {
        // 使用 this 指针比较当前对象和 other 对象
        return (this->x == other.x) && (this->y == other.y);
    }
};

int main() {
    Point p1(1, 2);
    Point p2(1, 2);
    Point p3(3, 4);

    std::cout << "p1 and p2 are the same: " << (p1.isSameAs(p2) ? "Yes" : "No") << std::endl;
    std::cout << "p1 and p3 are the same: " << (p1.isSameAs(p3) ? "Yes" : "No") << std::endl;
    return 0;
}
